import { Post } from '@/utils/request.ts'
import { respHomeData } from '@/pages/topic/api/types/api'

enum API {
  /** 首页 */
  // 获取首页数据
  HOME_DATA_URL = '/bioinfor/sg/front/homeData',

  /******************成员**********************/
  // 获取角色列表
  ROLE_LIST_URL = '/bioinfor/sg/back/member/queryRoleList',
  MEMBER_LIST_URL = '/bioinfor/sg/front/member',

  /**论文 */
  //获取论文分页列表
  ARTICLE_LIST_PAGE_URL = '/bioinfor/sg/back/thesis/page',
}

// 获取首页数据
export const reqGetHomeData = (code: string) =>
  Post<respHomeData>(API.HOME_DATA_URL, { code })

export const reqGetRoleList = (id: number) => Post(API.ROLE_LIST_URL, { id })

// 获取成员列表(分页)
export const reqGetMemberList = (reqData) => Post(API.MEMBER_LIST_URL, reqData)

export const reqGetArticleListPage = (reqData) =>
  Post(API.ARTICLE_LIST_PAGE_URL, reqData)
